<template>
	<u-popup :show="show" :round="10"  mode="center" @close="close" :closeable="true">
		<view class="qqPopup">
            <view style="color: #FFFFFF;font-weight: 800;">加入社区</view>
			<view style="width: 100%;display: flex;flex-direction: column;align-items: center;">
				<view class="qqBlock">
					  <image src="/static/myimages/QQ.png" mode="widthFix" style="width: 40rpx;"></image>
					  <view>QQ社群:{{QQ || '123456789'}}</view>
					  <image @click="handleCopy(QQ)" src="/static/public-images/copy.png" mode="widthFix" style="width: 40rpx;"></image>
				</view>
				<view style="color: #FFFFFF;font-size: 25rpx;margin-top: 20rpx;">加入QQ社区和更多玩家一起交谈</view>
			</view>
            <view></view>
		</view>
	</u-popup>
</template>
<script>
	import {copy} from '@/utils/common.js'
	import {getMainQQ} from '@/api/index.js'
  export default {
	  props:{
		  show:{
			  type:Boolean,
			  default:false
		  }
	  },
    data() {
      return {
		  QQ:''
      }
    },
    methods: {
		async getQQ(){
			let res = await getMainQQ()
			this.QQ = res.data.number
		},
      close() {
        this.$emit('success')
      },
	  handleCopy(){
		  copy(this.QQ)
	  }
    }
  }
</script>
<style scoped>
	.qqBlock{
		width: 100%;
		height: 80rpx;
		border: 1rpx solid #63738A;
		border-radius: 10rpx;
		padding: 0 25rpx;
		box-sizing: border-box;
		display: flex;
		align-items: center;
		justify-content: space-between;
		font-size: 25rpx;
		color: #FFFFFF;
	}
	.qqPopup{
		width: 600rpx;
		height: 400rpx;
		background-color: #1E283B;
		padding: 25rpx 40rpx 20rpx 40rpx;
		box-sizing: border-box;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: space-between;
		border-radius: 20rpx;
	}
</style>
